<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
        .active{
            color: red;
        }
    </style>
</head>
<body>
    <div id="app">
        {{msg}}
        {{1+1}}
        {{true ? '1' : '123'}}

        <!-- display:none -->
        <div v-show="true">这是div1</div>
        <!-- 控制dom节点是否挂在dom树上 -->
        <div v-if="true">这是div2</div>

        <div v-for="(item,index) in [1,2,3,4,5]">{{item}} --- {{index}}</div>

        <div v-for="item in 10">{{item}}</div>

        <div v-for="(value,key) in {name:'tom',age:'10',height:'111'}">
            {{value}} --- {{key}}
        </div>

        <div v-for="item in 'this is mdsa' ">{{item}}</div>

        <div class="active">测试文字</div>
        <div :class="active">测试文字</div>
        <div :class="{active:true}">测试文字</div>

        <div style="color: blue;">测试style文字</div>
        <div :style="{color:false ? 'red' : 'blue'}">测试style文字</div>
    </div>

    <script src="js/vue.js"></script>
    <script>
        let myApp = new Vue({
            el:'#app',
            data:{
                msg:'this is test text',
                active:['active','a','b','c']
            }
        })
    </script>
</body>
</html>